﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;

namespace Passwords.Biz
{
    public class TitlePasswordItem : PasswordItem
    {
        private static readonly PasswordLabel titleLabel = new PasswordLabel(0, "Name", (int)ItemType.Name, -1);

        public TitlePasswordItem(Password password)
            : base(password, titleLabel)
        {
            value = password.Name;
            undo = value;
            IsEmpty = false;
        }

        public override bool IsReadonly {get{return true;}}

        public override void Save()
        {
            Password.Name = Value;
            undo = Value;
        }

    }
}
